package com.zhaoc.service;

import com.zhaoc.domain.PageBean;
import com.zhaoc.domain.take_delivery.Promotion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.ws.rs.*;


/**
 * <p>title:com.zhaoc.service</p>
 * date:2018/8/12 0012
 * time:18:14
 * author:赵成
 * user:13566
 */
public interface IPromotionService {
    //保存宣传任务
    void save(Promotion model);
    //分页查询
    Page<Promotion> findPageData(Pageable pageable);

    //根据page和rows返回数据
    @Path("/pageQuery")
    @GET
    @Produces({"application/xml","application/json"})
    PageBean<Promotion> findPageData(@QueryParam("page") int page,
                                    @QueryParam("rows") int rows);

    //根据id查询
    @Path("/prommotion/{id}")
    @GET
    @Produces({"application/xml","application/xjson"})
    Promotion findById(@PathParam("id") Integer id);

}
